*Understanding Public Participation as a Mechanism Affecting Government Fiscal Outcomes: Theory and Evidence from Participatory Budgeting*
*Jinsol Park*

xtset Gov_ID Year

**generate log
gen ln_n_committmtg =log(n_committmtg)
gen ln_n_committmember =log(n_committmember)
gen ln_n_projectpropose=log(n_projectpropose)
gen ln_pbamountpropose=log(pbamountpropose)
gen ln_percapita_pbamountpropose=log(percapita_pbamountpropose)
gen ln_n_projectadopt=log(n_projectadopt)
gen ln_pbamountadopt=log(pbamountadopt)
gen ln_percapita_pbamountadopt=log(percapita_pbamountadopt)
gen ln_population=log(population)
gen ln_popdensity=log(popdensity)
gen ln_n_workers=log(n_workers)
gen ln_welfare=log(welfare)
gen ln_welfare_percap=log(welfare_percap)
gen ln_debt_percapita=log(debt_percapita)

**factor loading (explanatory factor analysis: EFA)** Appendix2
factor ln_n_committmtg ln_n_committmember adjcouncil subcommtype researchcoun zonedmtg budgetschool ordinance ln_percapita_pbamountpropose ln_percapita_pbamountadopt
predict factor1 factor2
alpha ln_n_committmtg ln_n_committmember adjcouncil subcommtype researchcoun zonedmtg budgetschool ordinance
alpha ln_percapita_pbamountpropose ln_percapita_pbamountadopt

*Table 1 (summary statistics)
sum fiscal_balance_percap fiscal_balance_ratio debt_percapita debt_perbudget factor1 factor2 population pop_growth pop_1564_rate pop_65_rate popdensity headparty_bi progressive_rate partycoherence multipleelect n_workers unemp_rat depdendence_rate

*Appendix 1
sum n_committmtg n_committmember adjcouncil subcommtype researchcoun zonedmtg budgetschool ordinance percapita_pbamountpropose percapita_pbamountadopt


**********************************************************
*******************A: test with factor1*******************
**********************************************************

*Table 2
**A-(1) naive regression (fiscal balance per capita)**
reg fiscal_balance_percap factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H1reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust
outreg2 using "H1iv.doc", replace coef dec(4) label excel 

**A-(2) naive regression (fiscal balance_ratio)**
reg fiscal_balance_ratio factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H2reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor1 = ln_welfare_percap), robust
outreg2 using "H2iv.doc", replace coef dec(4) label excel 


**A-(3) naive regression (debt per capita)**
reg debt_percapita factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H3reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor1 = ln_welfare_percap), robust
outreg2 using "H3iv.doc", replace coef dec(4) label excel 


**A-(4) naive regression (debt per budget)**
reg debt_perbudget factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H4reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor1 = ln_welfare_percap), robust
outreg2 using "H4iv.doc", replace coef dec(4) label excel 


**********************************************************
*******************B: test with factor2*******************
**********************************************************

*Table 3
**B-(1) naive regression (fiscal balance per capita)**
reg fiscal_balance_percap factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H1Breg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust
outreg2 using "H1Biv.doc", replace coef dec(4) label excel 

**B-(2) naive regression (fiscal balance_ratio)**
reg fiscal_balance_ratio factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H2Breg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor2 = ln_welfare_percap), robust
outreg2 using "H2iv.doc", replace coef dec(4) label excel 

**A-(3) naive regression (debt per capita)**
reg debt_percapita factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H3Breg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor2 = ln_welfare_percap), robust
outreg2 using "H3iv.doc", replace coef dec(4) label excel 

**A-(4) naive regression (debt per budget)**
reg debt_perbudget factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H4Breg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor2 = ln_welfare_percap), robust
outreg2 using "H4iv.doc", replace coef dec(4) label excel 


*Appendix3
reg  factor1 ln_welfare_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "fst11.doc", replace coef dec(4) label excel 

reg  factor2 ln_welfare_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "fst12.doc", replace coef dec(4) label excel 


**with lagged variables**
by Gov_ID: gen lagfactor1=factor1[_n-1]
by Gov_ID: gen lagfactor2=factor2[_n-1]

**********************************************************
*******************A: test with factor1*******************
**********************************************************

*Appendix4
**A-(1) naive regression (fiscal balance per capita)**
reg fiscal_balance_percap lagfactor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H1reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor1 = ln_welfare_percap), robust
outreg2 using "H1iv.doc", replace coef dec(4) label excel 

**A-(2) naive regression (fiscal balance_ratio)**
reg fiscal_balance_ratio lagfactor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H2reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor1 = ln_welfare_percap), robust
outreg2 using "H2iv.doc", replace coef dec(4) label excel 


**A-(3) naive regression (debt per capita)**
reg debt_percapita lagfactor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H3reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor1 = ln_welfare_percap), robust
outreg2 using "H3iv.doc", replace coef dec(4) label excel 


**A-(4) naive regression (debt per budget)**
reg debt_perbudget lagfactor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H4reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor1 = ln_welfare_percap), robust
outreg2 using "H4iv.doc", replace coef dec(4) label excel 


**********************************************************
*******************B: test with factor2*******************
**********************************************************

*Appendix5
**B-(1) naive regression (fiscal balance per capita)**
reg fiscal_balance_percap lagfactor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H1Breg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (lagfactor2 = ln_welfare_percap), robust
outreg2 using "H1Biv.doc", replace coef dec(4) label excel 

**B-(2) naive regression (fiscal balance_ratio)**
reg fiscal_balance_ratio lagfactor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H2Breg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor2 = ln_welfare_percap), robust
outreg2 using "H2iv.doc", replace coef dec(4) label excel 

**A-(3) naive regression (debt per capita)**
reg debt_percapita lagfactor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H3Breg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor2 = ln_welfare_percap), robust
outreg2 using "H3iv.doc", replace coef dec(4) label excel 

**A-(4) naive regression (debt per budget)**
reg debt_perbudget lagfactor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
outreg2 using "H4Breg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg2 debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor2 = ln_welfare_percap), robust
outreg2 using "H4iv.doc", replace coef dec(4) label excel 


***********************************************************************
*****************endogeneity test, factor 1 (Table 2,3)***************
***********************************************************************

***endogeneity test for factor1, reference: Baum et al. stata journal for ivreg2***
ivreg2 fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust endogtest(factor1)
***==> the test reject the null that factor1 may be treated as exogeneous.

ivreg2 fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust endogtest(factor1)
ivreg2 debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust endogtest(factor1)
ivreg2 debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust endogtest(factor1)

***********************************************************************
*****************endogeneity test, factor 2 (Table 2,3)***************
***********************************************************************
ivreg2 fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust endogtest(factor2)
ivreg2 fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust endogtest(factor2)
ivreg2 debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust endogtest(factor2)
ivreg2 debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust endogtest(factor2)

***********************************************************************
*****************endogeneity test, lag factor 1 (Appendix 4)***************
***********************************************************************

*Appendix4
ivreg2 fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor1 = ln_welfare_percap), robust endogtest(lagfactor1)
ivreg2 fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor1 = ln_welfare_percap), robust endogtest(lagfactor1)
ivreg2 debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor1 = ln_welfare_percap), robust endogtest(lagfactor1)
ivreg2 debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor1 = ln_welfare_percap), robust endogtest(lagfactor1)

***********************************************************************
*****************endogeneity test, lag factor 2 (Appendix 5)***************
***********************************************************************
*Appendix5
ivreg2 fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (lagfactor2 = ln_welfare_percap), robust endogtest(lagfactor2)
ivreg2 fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor2 = ln_welfare_percap), robust endogtest(lagfactor2)
ivreg2 debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor2 = ln_welfare_percap), robust endogtest(lagfactor2)
ivreg2 debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (lagfactor2 = ln_welfare_percap), robust endogtest(lagfactor2)


**********************************************************
**********************report SD (beta)********************
**********************************************************

**factor1
**A-(1) naive regression (fiscal balance per capita)**
reg fiscal_balance_percap factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust beta
outreg2 using "H1reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust beta
outreg2 using "H1iv.doc", replace coef dec(4) label excel 

**A-(2) naive regression (fiscal balance_ratio)**
reg fiscal_balance_ratio factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust beta
outreg2 using "H2reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor1 = ln_welfare_percap), robust beta
outreg2 using "H2iv.doc", replace coef dec(4) label excel 

**A-(3) naive regression (debt per capita)**
reg debt_percapita factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust beta
outreg2 using "H3reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor1 = ln_welfare_percap), robust beta
outreg2 using "H3iv.doc", replace coef dec(4) label excel 

**A-(4) naive regression (debt per budget)**
reg debt_perbudget factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust beta
outreg2 using "H4reg.doc", replace coef dec(4) label excel 
**IV regression**
ivreg debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor1 = ln_welfare_percap), robust beta
outreg2 using "H4iv.doc", replace coef dec(4) label excel 


**factor 2
**A-(1) naive regression (fiscal balance per capita)**
reg fiscal_balance_percap factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust beta
**IV regression**
ivreg fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust beta

**A-(2) naive regression (fiscal balance_ratio)**
reg fiscal_balance_ratio factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust beta
**IV regression**
ivreg fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor2 = ln_welfare_percap), robust beta

**A-(3) naive regression (debt per capita)**
reg debt_percapita factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust beta
**IV regression**
ivreg debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor2 = ln_welfare_percap), robust beta

**A-(4) naive regression (debt per budget)**
reg debt_perbudget factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust beta
**IV regression**
ivreg debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor2 = ln_welfare_percap), robust beta

****Appendix6 with inverse hyperbolic sine****

gen invsin_fiscal_balance_ratio=ln(fiscal_balance_ratio+sqrt(fiscal_balance_ratio*fiscal_balance_ratio+1))
gen invsin_fiscal_balance_percap=ln(fiscal_balance_percap+sqrt(fiscal_balance_percap*fiscal_balance_percap+1))
gen invsin_debt_percapita=ln(debt_percapita+sqrt(debt_percapita*debt_percapita+1))
gen invsin_debt_perbudget=ln(debt_perbudget+sqrt(debt_perbudget*debt_perbudget+1))

**(1) factor 1
reg invsin_fiscal_balance_percap factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
ivreg2 invsin_fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust
*endogeniety test
ivreg2 invsin_fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust endogtest(factor1)

reg invsin_fiscal_balance_ratio factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
ivreg2 invsin_fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate (factor1 = ln_welfare_percap), robust
*endogeniety test
ivreg2 invsin_fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust endogtest(factor1)

reg invsin_debt_percapita factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
ivreg2 invsin_debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust endogtest(factor1)
*endogeneity test
ivreg2 invsin_debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust endogtest(factor1)

reg invsin_debt_perbudget factor1 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
ivreg2 invsin_debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust endogtest(factor1)
*endogeneity test
ivreg2 invsin_debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor1 = ln_welfare_percap), robust endogtest(factor1)

**(2) factor 2
reg invsin_fiscal_balance_percap factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
ivreg2 invsin_fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust
*endogeneity test
ivreg2 invsin_fiscal_balance_percap ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust endogtest(factor2)

reg invsin_fiscal_balance_ratio factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
ivreg2 invsin_fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust
*endogeneity test
ivreg2 invsin_fiscal_balance_ratio ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust endogtest(factor2)

reg invsin_debt_percapita factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
ivreg2 invsin_debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust
*endogeneity test
ivreg2 invsin_debt_percapita ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust endogtest(factor2)

reg invsin_debt_perbudget factor2 ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate, robust
ivreg2 invsin_debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust
*endogeneity test
ivreg2 invsin_debt_perbudget ln_population pop_1564_rate pop_65_rate ln_popdensity headparty_bi progressive_rate partycoherence multipleelect ln_n_workers unemp_rat depdendence_rate  (factor2 = ln_welfare_percap), robust endogtest(factor2)



*the end*
